package com.houseman.workFlow.dao;

import java.util.List;

import com.houseman.workFlow.bean.TaskArea;
import com.houseman.workFlow.dto.NextStepInfo;

public interface TaskAreaDao {

	/**
	 * 根据graphId获得所有taskArea对象
	 * @return
	 * @throws Exception
	 */
	public List<TaskArea> queryTaskAreas(int graphId) throws Exception;
	
	/**
	 * 根据graphId查询所有taskArea的Id
	 * @return
	 * @throws Exception
	 */
	public List<Integer> queryTaskAreaIds(int graphId) throws Exception;
	
	/**
	 * 获取下一办理NextStepInfo
	 * @param step
	 * @return
	 * @throws Exception
	 */
	public List<NextStepInfo> queryNextStepInfo(int graphId, int step) throws Exception;
	
	/**
	 * 获取当前办理TaskArea
	 * @param step
	 * @return
	 * @throws Exception
	 */
	public TaskArea queryTaskAreaByStep(int graphId, int step) throws Exception;
	
	/**
	 * 保存流程图信息
	 * @param graph
	 * @throws Exception
	 */
	public void savaTaskArea(List<TaskArea> tasks, int graphId) throws Exception;
	
	/**
	 * 更新流程图信息
	 * @param graph
	 * @throws Exception
	 */
	public void updateTaskArea(List<TaskArea> tasks) throws Exception;
	
	/**
	 * 删除流程图
	 * @param GRAPHID
	 * @throws Exception
	 */
	public void deleteTaskAreaById(List<Integer> ids) throws Exception;
	
	/**
	 * 删除流程图
	 * @param GRAPHID
	 * @throws Exception
	 */
	public void deleteTaskAreaByGraphId(int graphId) throws Exception;
}
